#coding=utf-8
from zhaokelai.analyse.models import *
from django.contrib import admin

class subjectAdmin(admin.ModelAdmin):
    list_display = ('label', 'thetime')
    list_display_links = ('label', 'thetime')
    list_select_related=True
    list_per_page=30
    ordering=['-thetime']
    search_fields =['label']
    

class headingAdmin(admin.ModelAdmin):
    list_display = ('title', 'subject')
    list_display_links = ('title', 'subject')
    list_select_related=True
    list_per_page=30
    ordering=['-subject','serial']
    search_fields =['title','subject']

class answerAdmin(admin.ModelAdmin):
    list_display = ('title','serial','score','heading')
    list_display_links = ('title','serial','score','heading')
    list_select_related=True
    list_per_page=30
    ordering=['-heading','serial']
    search_fields =['title','heading']

class resultAdmin(admin.ModelAdmin):
    list_display = ('heading','answer','customer','thetime')
    list_display_links = ('heading','answer','customer','thetime')
    list_select_related=True
    list_per_page=30
    ordering=['-thetime']
    search_fields =['answer','heading']

admin.site.register(subject,subjectAdmin)
admin.site.register(heading,headingAdmin)
admin.site.register(answer,answerAdmin)
admin.site.register(result,resultAdmin)